<template>
	<view class="page-my-card-detail">
		<MxVipCardDetail class="cmp-vip-card-detail" :info="info" :image="image" />
	</view>
</template>

<script>
	import MxVipCardDetail from '@/components/common/MxVipCardDetail.vue';
	export default {
		components: {
			MxVipCardDetail
		},
		data() {
			return {
				info: {}
			};
		},
		computed: {
			image() {
				return this.info.image?.file_path
			}
		},
		onLoad() {
			const eventChannel = this.getOpenerEventChannel();
			// 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('acceptDataFromOpenerPage', data => {
				this.info = data
			})
		}
	}
</script>

<style lang="scss" scoped>
	.page-my-card-detail {

		.cmp-vip-card-detail {
			margin: 0 auto;
		}
	}
</style>
